import axios from '@/request/request'

import qs from "qs"
export const JingpinAPI =()=> axios.get('/products/recommend')
export const HotAPI =()=> axios.get('/products/hot')
export const sendSMSAPI=(params)=> axios.post('/sendSMS',qs.stringify(params))

export const PhoneRegin=(params)=> axios.post('/phoneRegin',qs.stringify(params))

// weixin
export const weiXinLoginAPI=(params)=> axios.post('/wechatUsers/PCLogin',qs.stringify(params))
export const BangDingAPI=(params)=> axios.post('/wechatUsers/binding',qs.stringify(params))

// 
export const UserInfoAPI = () => axios.get('/shop/userProfiles')
// 详情
// /products/{id}
export const GoodsDetaillsAPI =(id)=> axios.get(`products/${id}`)
// 购物车
export const shopAPI = (params) => axios.post('/shop/carts/add', qs.stringify(params))
// 全部商品
export const productsAPI = (params) => axios.get('/products', { params })